package com.taobao.ui.widget;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

import com.taobao.pojo.Smaller;
import com.taobao.tools.Binding;

public class UpdateSmallerWidget extends CommonWidget {
    public static String ID = "com.taobao.ui.widget.UpdateSmallerWidget";
    private Text text;
    private Text text_1;
    private Text text_2;

    @Override
    public String getID() {
        return ID;
    }

    /**
     * Create the composite.
     * 
     * @param parent
     * @param style
     */
    public UpdateSmallerWidget(Composite parent, int style) {
        super(parent, style);
        GridLayout gridLayout = new GridLayout(1, false);
        gridLayout.marginWidth = 0;
        gridLayout.marginHeight = 0;
        setLayout(gridLayout);

        Composite composite_1 = new Composite(this, SWT.NONE);
        composite_1.setLayout(new GridLayout(2, false));
        composite_1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));

        Label label = new Label(composite_1, SWT.NONE);
        label.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
        label.setText("\u5C0F\u53F7\u540D\u79F0\uFF1A");

        text = new Text(composite_1, SWT.BORDER);
        text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
        Binding.binding(getThis(UpdateSmallerWidget.class), text, Binding.GROUP_TEXT, Smaller.class, "smallerName");

        Label label_1 = new Label(composite_1, SWT.NONE);
        label_1.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
        label_1.setText("\u5BC6\u7801\uFF1A");

        text_1 = new Text(composite_1, SWT.BORDER);
        text_1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
        Binding.binding(getThis(UpdateSmallerWidget.class), text_1, Binding.GROUP_TEXT, Smaller.class, "tbPwd");

        Label lblTid = new Label(composite_1, SWT.NONE);
        lblTid.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
        lblTid.setText("TID\uFF1A");

        text_2 = new Text(composite_1, SWT.BORDER);
        text_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
        Binding.binding(getThis(UpdateSmallerWidget.class), text_2, Binding.GROUP_TEXT, Smaller.class, "tid");
    }

}
